package Work4.Slay_the_Maze.Relics;

import Work4.Slay_the_Maze.Player.Player;

public class Barbell extends Relics {
	private int numValue=1;
	public int getNumValue() {
		return numValue;
	}
	public void setNumValue(int numValue) {
		this.numValue = numValue;
	}
	public Barbell() {
		super("哑铃",70);
	}
	public void PrintInfo() {
		System.out.println("哑铃：你有种想锻炼的冲动，你获得1点力量");
	}
	public void useit(Player player) {
		player.setPower(player.getPower()+numValue);
	}
	
	public Barbell(Barbell other) {
        // 调用父类的构造函数，复制父类属性
        super(other.getName(),other.getValue());
        // 复制 Defense 类的特定属性
        this.numValue = other.numValue;
    }

    // 克隆方法
    @Override
    public Barbell clone() {
        return new Barbell(this);  // 使用拷贝构造函数
    }
}
